3.778 \(\int \frac{\sqrt{1-\cos (x)}}{\sqrt{a-\cos (x)}} \, dx\)

Optimal. Leaf size=26 \[ -2 \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{1-\cos (x)} \sqrt{a-\cos (x)}}\right ) \]

[Out]

-2*ArcTan[Sin[x]/(Sqrt[1 - Cos[x]]*Sqrt[a - Cos[x]])]

________________________________________________________________________________________

Rubi [A]  time = 0.0776947, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2775, 204} \[ -2 \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{1-\cos (x)} \sqrt{a-\cos (x)}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 - Cos[x]]/Sqrt[a - Cos[x]],x]

[Out]

-2*ArcTan[Sin[x]/(Sqrt[1 - Cos[x]]*Sqrt[a - Cos[x]])]

Rule 2775

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
(-2*b)/f, Subst[Int[1/(b + d*x^2), x], x, (b*Cos[e + f*x])/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]])
], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sqrt{1-\cos (x)}}{\sqrt{a-\cos (x)}} \, dx &=2 \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\frac{\sin (x)}{\sqrt{1-\cos (x)} \sqrt{a-\cos (x)}}\right )\\ &=-2 \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{1-\cos (x)} \sqrt{a-\cos (x)}}\right )\\ \end{align*}

Mathematica [C]  time = 0.0674033, size = 47, normalized size = 1.81 \[ i \sqrt{2-2 \cos (x)} \csc \left (\frac{x}{2}\right ) \log \left (\sqrt{a-\cos (x)}+i \sqrt{2} \cos \left (\frac{x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[1 - Cos[x]]/Sqrt[a - Cos[x]],x]

[Out]

I*Sqrt[2 - 2*Cos[x]]*Csc[x/2]*Log[I*Sqrt[2]*Cos[x/2] + Sqrt[a - Cos[x]]]

________________________________________________________________________________________

Maple [B]  time = 0.346, size = 67, normalized size = 2.6 \begin{align*} -{\frac{1}{\sin \left ( x \right ) \left ( -1+\cos \left ( x \right ) \right ) } \left ( 2-2\,\cos \left ( x \right ) \right ) ^{{\frac{3}{2}}}\sqrt{a-\cos \left ( x \right ) }\arctan \left ({\frac{\sqrt{2}}{2}\sqrt{-2\,{\frac{-a+\cos \left ( x \right ) }{\cos \left ( x \right ) +1}}}} \right ){\frac{1}{\sqrt{-2\,{\frac{-a+\cos \left ( x \right ) }{\cos \left ( x \right ) +1}}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-cos(x))^(1/2)/(a-cos(x))^(1/2),x)

[Out]

-(2-2*cos(x))^(3/2)*(a-cos(x))^(1/2)*arctan(1/2*2^(1/2)*(-2*(-a+cos(x))/(cos(x)+1))^(1/2))/sin(x)/(-1+cos(x))/
(-2*(-a+cos(x))/(cos(x)+1))^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x))^(1/2)/(a-cos(x))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.6862, size = 103, normalized size = 3.96 \begin{align*} \arctan \left (\frac{{\left (a - 2 \, \cos \left (x\right ) - 1\right )} \sqrt{-\cos \left (x\right ) + 1}}{2 \, \sqrt{a - \cos \left (x\right )} \sin \left (x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x))^(1/2)/(a-cos(x))^(1/2),x, algorithm="fricas")

[Out]

arctan(1/2*(a - 2*cos(x) - 1)*sqrt(-cos(x) + 1)/(sqrt(a - cos(x))*sin(x)))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{1 - \cos{\left (x \right )}}}{\sqrt{a - \cos{\left (x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x))**(1/2)/(a-cos(x))**(1/2),x)

[Out]

Integral(sqrt(1 - cos(x))/sqrt(a - cos(x)), x)

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x))^(1/2)/(a-cos(x))^(1/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError